package com.acdc.mqtt.entity;

import com.fasterxml.jackson.annotation.JsonValue;

/**
 * MQTT消息类型
 */
public enum MqttMsgType {
    HEART_UP("HEART_UP"),WK_PUB("WK_PUB"),SET("SET"),
    _485_ACK("485_ACK"),OTA_REQ("OTA_REQ");

    MqttMsgType(String msgType) {
        this.msgType = msgType;
    }

    private String msgType;

    @JsonValue
    public String getMsgType() {
        return msgType;
    }

    public MqttMsgType getMsgType(String msgType) {
        return MqttMsgType.valueOf(msgType);
    }
}
